# coding: utf-8
from django.shortcuts import render
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse, JsonResponse
from common.overwrites import z_render_to_response
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from django.conf import settings
import requests
from common.services.util import UtilService


@csrf_exempt
def index(request):
    return z_render_to_response('others.html')


@login_required
@csrf_exempt
def tools(request):
    return z_render_to_response('tools.html')


@login_required
@csrf_exempt
def picker(request):
    if request.method == 'POST':
        url = request.POST.get('url')
        if UtilService.valid_regex('URL', url):
            pass
        else:
            pass

        return z_render_to_response('tools.html')


@login_required
@csrf_exempt
def song_index(request):
    return z_render_to_response('song_index.html')



@login_required
@csrf_exempt
def words_index(request):
    return z_render_to_response('words_index.html')
